package com.jzo2o.orders.manager.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jzo2o.api.market.dto.response.AvailableCouponsResDTO;
import com.jzo2o.orders.base.model.domain.Orders;
import com.jzo2o.orders.manager.model.dto.request.OrdersPayReqDTO;
import com.jzo2o.orders.manager.model.dto.request.PlaceOrderReqDTO;
import com.jzo2o.orders.manager.model.dto.response.OrdersPayResDTO;
import com.jzo2o.orders.manager.model.dto.response.PlaceOrderResDTO;

import java.util.List;

/**
 * <p>
 * 下单服务类
 * </p>
 * @author itcast
 * @since 2023-07-10
 */
public interface IOrdersCreateService extends IService<Orders> {
    /**
     * 微服务标识
     */
    String PRODUCT_APP_ID = "jzo2o.orders";

    /**
     * 客户端下单接口
     */
    PlaceOrderResDTO placeOrder(PlaceOrderReqDTO placeOrderReqDTO);

    /**
     * 客户端支付接口
     * @param id 订单id
     */
    OrdersPayResDTO payOrder(Long id, OrdersPayReqDTO ordersPayReqDTO);

    /**
     * 客户端获取支付状态
     */
    OrdersPayResDTO getPayResult(Long id);

    /**
     * 客户端获取可用优惠卷
     */
    List<AvailableCouponsResDTO> getAvailableCoupons(Long serveId, Integer purNum);
}